#编译器
CC=g++
#编译选项
CFLAGS=-c -Wall -lmath
#链接选项
LDFLAGS=
#将所有源文件添加到 SOURCES
SOURCES=main.cpp Triangle.cpp
OBJECTS=$(SOURCES:.cpp=.o)
#可执行文件名
EXECUTABLE=triangle

all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

